home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PCMania 19
/
PCMania19.iso
/
Jogos em Flash
/
CARTAS
/
TAROT.SWF
/
scripts
/
frame_46
/
DoAction_2.as
next >
Wrap
Text File
|
2003-11-17
|
2KB
|
66 lines
function ordercards()
{
listnumber = new Array();
orderelement = new Array();
t = 0;
while(21 >= t)
{
listnumber[t] = t;
t++;
}
t = 0;
while(21 >= t)
{
orderelement[t] = listnumber.splice(Math.floor(Math.random() * listnumber.length),1);
t++;
}
}
function duplicatecards(framerotation)
{
if(nbrcards != 22)
{
doscarte._rotation = rotation.angle._rotation;
doscarte._x = rotation._x + rotation.angle._x;
doscarte._y = rotation._y;
}
if(Math.floor(framerotation % ((rotation._totalframes - 12) / 22)) == 1)
{
if(nbrcards == 0)
{
setProperty(cartes.carte0, _rotation, rotation.angle._rotation);
setProperty(cartes.carte0, _X, rotation.angle._x);
cartes.carte0.cardnbr = _root.orderelement[0];
setProperty("cartes.carte0.btncarte", _visible, false);
setProperty("cartes.carte0.btncarteinterpretation", _visible, false);
nbrcards++;
_root.cartes._visible = true;
}
else
{
levelcard++;
duplicateMovieClip(cartes.carte0,"carte" + nbrcards,16384 + levelcard);
setProperty(String("cartes.carte" + nbrcards), _rotation, rotation.angle._rotation);
setProperty(String("cartes.carte" + nbrcards), _X, rotation.angle._x);
set(String("cartes.carte" + nbrcards) + "/:cardnbr",_root.orderelement[nbrcards]);
setProperty("cartes.carte" + nbrcards + ".btncarte", _visible, false);
setProperty("cartes.carte" + nbrcards + ".btncarteinterpretation", _visible, false);
nbrcards++;
}
}
}
function carteschoisies(numcarte)
{
_root.numcarteschoisies.push(parseInt(numcarte));
_root.ejectcartes.push(parseInt(numcarte));
if(_root.numcarteschoisies.length == 2)
{
t = 0;
while(21 >= t)
{
eval("cartes.carte" + t + ".btncarte")._visible = false;
t++;
}
messages.play();
}
}